import 'package:get/get.dart';
import 'package:smart_devices/model/repair_order.dart';
import 'package:smart_devices/model/spare_part.dart';

class RepairInfoLogic extends GetxController with GetTickerProviderStateMixin {
  Rx<SparePartModel> details = Rx(
      SparePartModel(imgUrl: '', name: '', code: '', model: '', count: 0, change: 0, inventory: 0));
  Rx<RepairOrderModel> order = Rx(RepairOrderModel(
      title: '',
      orderNo: '',
      name: '',
      code: '',
      location: '',
      degree: RepairOrderDegreeEnum.fast,
      addTime: '',
      status: RepairOrderEnum.fast));

  RxInt tabIndex = RxInt(0);

  RxBool isTabClick = RxBool(false);

  @override
  void onInit() {
    super.onInit();
    if (Get.arguments != null) {
      details.value = Get.arguments['details'] as SparePartModel;
      order.value = Get.arguments['order'] as RepairOrderModel;
    }
  }

}
